﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Brain
{
    public static class ByteUtil
    {
        /// <summary>
        /// Linearly interpolates between a value to another
        /// </summary>
        /// <param name="value1"></param>
        /// <param name="value2"></param>
        /// <param name="amount"></param>
        /// <returns></returns>
        public static byte Lerp(byte value1, byte value2, float amount)
        {
            return (byte)(value1 + (value2 - value1) * amount);
        }
    }
}
